package com.example.jetpack_databinding.main6

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.databinding.DataBindingUtil
import androidx.recyclerview.widget.LinearLayoutManager
import com.example.jetpack_databinding.R
import com.example.jetpack_databinding.databinding.ActivityMain6Binding

class MainActivity6 : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val activityMain6Binding =
            DataBindingUtil.setContentView<ActivityMain6Binding>(this, R.layout.activity_main6)

        activityMain6Binding.recycleview.layoutManager=LinearLayoutManager(this)
        val arrayListOf = arrayListOf<RvItem>()
        arrayListOf.add(RvItem("000", "000", "https://img2.baidu.com/it/u=1921532075,1173186660&fm=26&fmt=auto&gp=0.jpg"))
        arrayListOf.add(RvItem("111", "111", "https://img2.baidu.com/it/u=1921532075,1173186660&fm=26&fmt=auto&gp=0.jpg"))
        arrayListOf.add(RvItem("222", "222", "",R.drawable.img1))

        activityMain6Binding.recycleview.adapter = Rvadapter(arrayListOf)

    }
}